#ifndef LoadState_h__
#define LoadState_h__

#include "GameState.h"
#include <d3dx9core.h>
#include "ResourceManager.h"
#include "AntTweakBar.h"

class LoadState : public GameState
{
public:
    LoadState();
    virtual void Update(int dt);
    virtual void Draw();
    virtual void Initialise();
    virtual void CleanUp();
    virtual void OnResume(){Reset();}
    virtual Camera* GetCamera();
    virtual ID3DXEffect* GetEffect();
    virtual BPhysicsEngine* GetPhysicsEngine();
    virtual void NotifyKeyPressDirectInput(bool pressed, int whichKey, KeyState state, int clientID = -1);
    virtual void NotifyKeyPressSDL(int type, int state, int key, int whichClient);
    virtual void HandleMessage(const char* message);
    virtual BPhysicsActor* CreateNetworkedActor(int whichModel, bool perception, int ID);
    virtual void CreatePlayer(int clientID, int Actor = -1);
    virtual void DestroyPlayer(int clientID, int actorID = -1);
    virtual NetworkedActor* FindNetworkedActor(int ID);
    LPD3DXFONT m_font;
    //Game State
    BPhysicsEngine* m_PEngine;
    ID3DXEffect* m_mainEffect;
    //State Specific
    Camera* m_camera;
    LPDIRECT3DVERTEXBUFFER9 m_texturedQuad;
    int m_quadVerts;
    TwBar* m_optionsBar;
    D3DXMATRIXA16 m_lightViewMatrix;
    D3DXMATRIXA16 m_lightProjMatrix;
    void RenderUI(Texture texture);
    void Reset();
    void ShaderInit();
    void CreateUI();
    void SetUpCameras();
};

#endif // LoadState_h__
